import sys


from PyQt5.QtCore import QCoreApplication, Qt
from PyQt5.QtWidgets import QApplication

from main_window import MainWindow
from table_model import TableModel


class Application(QApplication):
    def __init__(self, argv):
        super().__init__(argv)

        self.main_window = MainWindow()

        self.table_model = TableModel()
        
        table_view = self.main_window.tableView
        table_view.setModel(self.table_model)
        
        self.main_window.show()
        

if __name__ == '__main__':
    QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
    app = Application(sys.argv)
    app.exec_()
    

